#ifndef IMSECURITYCODEDLG_H
#define IMSECURITYCODEDLG_H

#include <QDialog>
#include <QString>
#include <string>

namespace Ui {
    class IMSecurityCodeDlg;
}

class IMSecurityCodeDlg : public QDialog
{
    Q_OBJECT

public:
    explicit IMSecurityCodeDlg(QWidget *parent = 0);
    ~IMSecurityCodeDlg();

    void SetAuthStateInfo(const QString& info);
    void SetAuthCodeSession(const std::string& session);
signals:
    void sendAuthCode(std::string session, std::string authcode);
    void cancelAuthCode(std::string session);
protected:
    virtual void showEvent(QShowEvent * event);

public slots:
    void onCheckAuthCode();
    void onCancel();

private:
    Ui::IMSecurityCodeDlg *ui;

    std::string m_session;
};

#endif // IMSECURITYCODEDLG_H
